<#import "incloud-template.ftl" as layout>
<script type="text/javascript" src="${url.resourcesPath}/js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="${url.resourcesPath}/js/jit-authen.js"></script>
<script type="text/javascript" src="${url.resourcesPath}/js/pnxclient.js"></script>
<script type="text/javascript" src="${url.resourcesPath}/js/authen.js"></script>
<@layout.registrationLayout displayMessage=!messagesPerField.existsError('username','password') displayInfo=realm.password && realm.registrationAllowed && !registrationDisabled??; section>
    <#if section = "header">
    <#elseif section = "form">
      <div id="kc-form">
        <div id="kc-form-wrapper">
            <#if realm.password>
              <form id="kc-form-login" onsubmit="login.disabled = true; return true;" action="${url.loginAction}" method="post">
                <div class="${properties.kcFormGroupClass!}">
                  <label for="username" class="${properties.kcLabelClass!}"><#if !realm.loginWithEmailAllowed>${msg("username")}<#elseif !realm.registrationEmailAsUsername>${msg("usernameOrEmail")}<#else>${msg("email")}</#if></label>
                  <input tabindex="1" id="username" class="${properties.kcInputClass!}" name="username" value="${(username!'')}" type="text" disabled />
                </div>
                <div class="${properties.kcFormGroupClass!}">
                  <label for="sn" class="${properties.kcLabelClass!}">${msg("证书")}</label>
                  <select class="${properties.kcSelectClass!}" id="certOptions" value="">
                    <option value="noKey" style="background-color: #1E2C3C;">无</option>
                  </select>
                </div>
                <script type="text/javascript">
                  testClientExist('${url.resourcesPath}/js/')
                </script>
                <div id="kc-form-buttons" class="${properties.kcFormGroupClass!}">
                  <input type="hidden" id="original" name="original" value="${(original!'')}"/>
                  <input type="hidden" id="signed_data" name="signed_data" value=""/>
                  <input type="hidden" id="authMode" name="authMode" value="cert"/>
                  <input tabindex="7" onclick="geneSignStr()" class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" name="test" id="geneSign" type="button" value="${msg("认证")}"/>
                </div>
              </form>
            </#if>
        </div>
      </div>
    <#elseif section = "info" >
    </#if>

</@layout.registrationLayout>
